package com.baichang.taoshunda.entity.em;

public enum FriendState {
    //10: 请求, 11: 被请求, 20: 同意, 21: 忽略, 30: 被删除
    请求(10), 被请求(11), 忽略(21), 被删除(30), 同意(20);

    private Integer code;

    private FriendState(Integer code) {
        this.code = code;
    }

    public static FriendState valueOfCode(Integer code) {
        FriendState[] states = FriendState.values();
        for (FriendState state : states) {
            if (state.getCode().equals(code)) {
                return state;
            }
        }
        return null;
    }

    public Integer getCode() {
        return this.code;
    }

    @Override
    public String toString() {
        return String.valueOf(this.code);
    }

}
